let arr = [1, 2, 3, 4, 5, 2, 4, 3, 3, 4]

newArr = [...new Set(arr)]

console.log('newArr', newArr);